#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
class A
{
public:
	A(int a = 0)
		: _a(a)
	{
		cout << "A():" << this << endl;
	}
	~A()
	{

		cout << "~A():" << this << endl;
	}

	
private:
	int _a;
};
//template <typename T>
//void Swap(const T& a,const T& b)
//{
//	T temp = a;
//	a = b;
//	b = temp;
//
//
//}
template<class T>
T Add(const T& left, const T& right)
{
	return left + right;
}
template <typename B>
class stack
{
public:
	stack(int size = 4)
	{
		arr = new B[size];


	}
	void push(int x);
private:
	B* arr;
	int size =0;
	int cacpcity =4;


};
template <typename B>
void stack<B>::push(int x)
{
	;
}
int main()
{
	int e = 3;
	double f = 12.0;
	stack<int> str;
	stack<float> str2;
	Add<int>(e, f);
	
	A* ptr = (A*)operator new(sizeof(A));
	A* ptr2 = (A*)operator new[](4 * sizeof(A));
	for (int i = 0; i < 4; i++)
	{
		new(&ptr2[i])A(3);
	}
	new(ptr)A(3);
	ptr->~A();
	for (int i = 0; i < 4; i++)
	{
		(& (ptr2[i]))->~A();
	}
	operator delete(ptr);
	
	

	return 0;
}